package collection;

import java.util.Vector;

public class VectorMain {
	
	public static void main(String[] args) {
		
		Vector v = new Vector();
		
		System.out.println("데이터 삽입 전 size: " + v.size());
		
		// 벡터 v에 데이터 삽입
		v.addElement(new String("망아지"));
		v.addElement(new String("송아지"));
		v.addElement(new String("강아지"));
		v.addElement(new String("병아리"));
		
		System.out.println("데이터 삽입 후 size: " + v.size());
		
		for (int i = 0; i < v.size(); i++) {
			String storedData = (String) v.elementAt(i);
			System.out.println("Vector v의 " + i + "번째: " + storedData);
		}
		
	}
	
}
